#include <stdio.h>
#include <string.h>


int main() 
{
  FILE * file = fopen("cat.c", "r");
  if (file == NULL ) {
    perror("shit");
    return 1;
  }

  char buffer[10];
  int i ;
  while (fgets(buffer, 10, file) != NULL ) {
    i++;
    printf("i is %d\n", i);
    printf("%s" , buffer);
  }
  fclose(file);
}
